<template>
    <div>
        <header>
            天地图数据源
        </header>
        <div id="map" style="height: 100%;width: 100%;">

        </div>
    </div>
</template>

<script lang="ts" setup> 
import { onMounted } from 'vue'
import { Map, View } from 'ol';
import { MousePosition } from 'ol/control';
onMounted(async () => { 

    let view = new View({
        center: [0, 0],
        projection: "EPSG:4326", // 坐标系，有EPSG:4326和EPSG:3857
        zoom: 12 // 地图缩放级别（打开页面时
    });
    let map = new Map({
        target: 'map',
        layers: [
            
        ],
        view
    })
    map.addControl(new MousePosition())
});
</script>